-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grass.jupyter: Use InteractiveMap with custom projections #4204
base: main
Are you sure you want to change the base?
Conversation
layout = self._ipywidgets.Layout(width=f"{width}px", height=f"{height}px") | ||
self.map = self._ipyleaflet.Map( | ||
basemap=basemap, layout=layout, scroll_wheel_zoom=True | ||
if crs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to get the CRS of the current project with g.proj, use the 'srid' key to get EPSG
else: | ||
crs_dict = crs | ||
|
||
proj = gs.read_command("g.proj", flags="jf", srid=crs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant g.proj -g
to get the srid key from the output which contains the EPSG:
g.proj -g
name=Lambert Conformal Conic
proj=lcc
datum=nad83
a=6378137.0
es=0.006694380022900787
lat_1=36.16666666666666
lat_2=34.33333333333334
lat_0=33.75
lon_0=-79
x_0=609601.22
y_0=0
no_defs=defined
srid=EPSG:3358
unit=Meter
units=Meters
meters=1
You can use parse_command
Hi there,
This is a basic implementation of my understanding of using
InteractiveMap
with custom projections.